package day10;


import java.util.Scanner;

public class Main1 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String str = in.nextLine();
            int sum1=getLen(str);
            int sum2=getChar(str);
            int sum3=getNum(str);
            int sum4=getSym(str);
            int sum=0;
            if(sum2==20&&sum3>=1&&sum4>=1){
                sum=sum1+sum2+sum3+sum4+5;
            }else if(sum2==10&&sum3>=1&&sum4>=1){
                sum=sum1+sum2+sum3+sum4+3;
            }else if(sum2==10&&sum3>=1&&sum4==0){
                sum=sum1+sum2+sum3+sum4+2;
            }else{
                sum=sum1+sum2+sum3+sum4;
            }
            if(sum>=90){
                System.out.println("VERY_SECURE");
            }else if(sum>=80){
                System.out.println("SECURE");
            }else if(sum>=70){
                System.out.println("VERY_STRONG");
            }else if(sum>=60){
                System.out.println("STRONG");
            }else if(sum>=50){
                System.out.println("AVERAGE");
            }else if(sum>=25){
                System.out.println("WEAK");
            }else if(sum>=0){
                System.out.println("VERY_WEAK");
            }

        }
    }
    public static int getLen(String str) {
        if(str.length() <= 4) {
            return 5;
        }else if(str.length() <= 7) {
            return 10;
        }else if(str.length() >= 8) {
            return 25;
        }else {
            return 0;
        }
    }
    public static int getChar(String str) {
        int small = 0;
        int big = 0;
        for(int i = 0; i < str.length(); i++) {
            if(str.charAt(i) >= 'A' && str.charAt(i) <= 'Z') {
                big++;
            }else if(str.charAt(i) >= 'a' && str.charAt(i) <= 'z') {
                small++;
            }
        }
        if(small > 0 && big > 0) {
            return 20;
        }else if(small > 0 || big > 0) {
            return 10;
        }else {
            return 0;
        }
    }
    public static int getNum(String str) {
        int sum = 0;
        for(int i = 0; i < str.length(); i++) {
            if(str.charAt(i) - '0' >= 0 && str.charAt(i) - '0' <= 9) {
                sum++;
            }
        }
        if(sum > 1) {
            return 20;
        }else if(sum == 1) {
            return 10;
        }else {
            return 0;
        }
    }
    public static int getSym(String str) {
        int sum = 0;
        for(int i = 0; i < str.length(); i++) {
            if(!(str.charAt(i) >= 'A' && str.charAt(i) <= 'Z')&&
                    !(str.charAt(i) >= 'a' && str.charAt(i) <= 'z') &&
                    !(str.charAt(i) - '0' >= 0 && str.charAt(i) - '0' <= 9)) {
                sum++;
            }
        }
        if(sum > 1) {
            return 25;
        }else if(sum == 1) {
            return 10;
        }else {
            return 0;
        }
    }


    // 切勿删除模板代码
        public static int func(int[] values, int h) {
            int sum = 0;
            for(int i = 0; i < values.length; i++) {
                sum += values[i];
            }
            int k = sum / h;
            if(sum % h != 0) {
                k++;
            }
            int count = 0;
            for(int i = 0; i < values.length; i++) {
                if(values[i] <= k) {
                    count++;
                }else{
                    int n = values[i] / k;
                    if(values[i] % k != 0) {
                        n++;
                    }
                    count = count + n;
                }
            }
            if(count <= h) {
                return k;
            }
            return k + (count-h);
        }


}
